<?php
namespace app\mobile\controller;
use app\mobile\common\Base;
use think\Db;
use think\Session;
//设备保修状态
class Warrantystate extends Base
{
    public function index()
    {

        // $data = $this->request->param();
        
        // $goodstags_id = Db::name('tagslogs')->where('sn', $data['sn'])->find()['goodstags_id'];
        // $good_id = Db::name('goodstags')->where('id', $goodstags_id)->find()['good_id'];
        
        // $info = Db::name('card')->where('tagslogs_sn', $data['sn'])->find();
       
        // $info['name'] = Db::name('good')->where('id', $good_id)->find()['name'];
        // $info['sn'] = $data['sn'];
        // $info['addtime'] = $info['addtime'] == 0 ? null : date('Y-m-d', $info['addtime']);
        // $info['com'] = $info['danwei'];
        // if($info['endtime'] == 0){
        //     $info['endtime'] = '暂未激活';
        // }else if($info['endtime']>time()){
        //     $info['endtime']= date('Y-m-d', $info['addtime']) . ' 至 ' . date('Y-m-d', $info['endtime']);
        // }else{
        //     $info['endtime'] = '已过期';
        // }
        // $this->assign('info',$info);
        $data = $this->request->param();
        $is_sn=is_sn($data['sn']);
        $this->assign('real_sn',$is_sn['sn']);
        
    	return $this->fetch();
    }

}
